<?php

namespace app\common\validate\Order;

use think\Validate;

// 商城订单的验证器
class Order extends Validate
{
    protected $rule =   [
        'code'  => 'require|unique:order',
        'busid'   => 'require',
        'amount'   => 'require',
        'province' => require,
        'city' => $userinfo['city'],
        'district' => $userinfo['district'],
        'address' => $userinfo['address'],
    ];

    protected $message  =   [
        'code.require' => '订单号必须填写',
        'code.unique'     => '订单号必须是唯一的值',
        'busid.require' => '用户必须填写',
        'amount.require' => '订单金额必须填写',
    ];

}